mui.init()

var help_list;
mui.plusReady(function () {
    help_list = new Vue({
        el: '#help_list',
        data: {
            lists:[],
        },
        mounted(){
            this.get_help_lists();
        },
        methods: {
            get_help_lists:function () {
                var api_host = plus.storage.getItem('HOST_URL');
                mui.ajax({
                    url:api_host+'/api/cusservice/help/helplist',
                    dataType:'json',
                    type:'get',
                    timeout:5000,
                    success:function(msg){
                        help_list.lists = msg.data;
                        plus.nativeUI.closeWaiting();
                        mui.currentWebview.show();
                    },
                    error:function () {
                        console.log('课程列表获取出错了');
                    }
                })
            },
            open_help_details:function (hid) {
                mui.openWindow({
                    url: 'helpDetail.html',
                    extras:{'helpid':hid},
                    createNew:false,
                    show: {
                        autoShow: true,
                        aniShow: 'pop-in',
                        duration: 400
                    }
                });
            }
        }
    })
    plus.nativeUI.closeWaiting();
    mui.currentWebview.show();
})
